package com.edu.admin.entity;


import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;

import com.edu.admin.common.BaseEntity;

/**
 * 年级表实体
 * 
 * @author Wangjiong
 * 
 */
@Table(name = "sys_grade")
public class SysGrade extends BaseEntity {


	/**
	 * 
	 */
	private static final long serialVersionUID = -2106252989920331493L;
	/**
	 * 年级id
	 * 
	 */
	@Id
	@GeneratedValue(generator = "JDBC")
	private Long gradeId;
	/**
	 * 年级名称
	 * 
	 */
	@NotBlank(message = "年级名称不能为空")
	private String gradeName;
	/**
	 * 学段id
	 * 
	 */
	@Min(value = 1, message = "学段不能为空") 
	private Long phaseId;
	/**
	 * 学制年份
	 * 
	 */
	@Min(value= 1 ,message= "学制年份不能小于1！" )  
	private Integer yearNum;
	/**
	 * 学段名称
	 * 
	 */
	@Transient
	private String phaseName;

	public Long getGradeId() {
		return gradeId;
	}

	public void setGradeId(Long gradeId) {
		this.gradeId = gradeId;
	}

	public String getGradeName() {
		return gradeName;
	}

	public void setGradeName(String gradeName) {
		this.gradeName = gradeName;
	}

	public Long getPhaseId() {
		return phaseId;
	}

	public void setPhaseId(Long phaseId) {
		this.phaseId = phaseId;
	}
	
	public Integer getYearNum() {
		return yearNum;
	}

	public void setYearNum(Integer yearNum) {
		this.yearNum = yearNum;
	}

	public String getPhaseName() {
		return phaseName;
	}

	public void setPhaseName(String phaseName) {
		this.phaseName = phaseName;
	}
	
	
	

}
